home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bgrowisofswriter.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  2.6 KB  |  107 lines

  1. /* 
  2.  *
  3.  * $Id: k3bgrowisofswriter.h 679276 2007-06-23 13:25:21Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_GROWISOFS_WRITER_H_
  17. #define _K3B_GROWISOFS_WRITER_H_
  18.  
  19. #include "k3babstractwriter.h"
  20.  
  21.  
  22. namespace K3bDevice {
  23.   class Device;
  24.   class DeviceHandler;
  25. }
  26. class KProcess;
  27.  
  28.  
  29.  
  30. class K3bGrowisofsWriter : public K3bAbstractWriter
  31. {
  32.   Q_OBJECT
  33.  
  34.  public:
  35.   K3bGrowisofsWriter( K3bDevice::Device*, K3bJobHandler*,
  36.               QObject* parent = 0, const char* name = 0 );
  37.   ~K3bGrowisofsWriter();
  38.  
  39.   bool active() const;
  40.  
  41.   int fd() const;
  42.   bool closeFd();
  43.  
  44.  public slots:
  45.   void start();
  46.   void cancel();
  47.  
  48.   void setWritingMode( int );
  49.  
  50.   /**
  51.    * If true the growisofs parameter -M is used in favor of -Z.
  52.    */
  53.   void setMultiSession( bool b );
  54.  
  55.   /**
  56.    * Only used in DAO mode and only supported with growisofs >= 5.15
  57.    * @param size size in blocks
  58.    */
  59.   void setTrackSize( long size );
  60.  
  61.   /**
  62.    * Use this in combination with setTrackSize when writing double layer media.
  63.    * @param lb The number of data sectors in the first layer. It needs to be less or equal
  64.    *           to tracksize/2. The writer will pad the second layer with zeros if
  65.    *           break < tracksize/2.
  66.    *           If set to 0 this setting will be ignored.
  67.    */
  68.   void setLayerBreak( long lb );
  69.  
  70.   /**
  71.    * Close the DVD to enable max DVD compatibility (uses the growisofs --dvd-compat parameter)
  72.    * This will also be used in DAO mode and when the layerBreak has been set.
  73.    */
  74.   void setCloseDvd( bool );
  75.  
  76.   /**
  77.    * set this to QString::null or an empty string to let the writer
  78.    * read it's data from fd()
  79.    */
  80.   void setImageToWrite( const QString& );
  81.  
  82.   /**
  83.    * While reading the image from stdin growisofs needs 
  84.    * a valid -C parameter for multisession.
  85.    */
  86.   void setMultiSessionInfo( const QString& );
  87.  
  88.   void setForceNoEject( bool );
  89.  
  90.  protected:
  91.   bool prepareProcess();
  92.  
  93.  protected slots:
  94.   void slotReceivedStderr( const QString& );
  95.   void slotProcessExited( KProcess* );
  96.   void slotEjectingFinished( K3bDevice::DeviceHandler* dh );
  97.   void slotThroughput( int t );
  98.   void slotFlushingCache();
  99.   void slotRingBufferFinished( bool );
  100.   
  101.  private:
  102.   class Private;
  103.   Private* d;
  104. };
  105.  
  106. #endif
  107.